#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__

#include "cocos2d.h"
#include "Monkey.h"
#include "Branch.h"
using namespace cocos2d;

class HelloWorld : public cocos2d::CCLayer
{
public:
    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();  

    // there's no 'id' in cpp, so we recommend returning the class instance pointer
    static cocos2d::CCScene* scene();
    
    // a selector callback
    void menuCloseCallback(CCObject* pSender);

	void fCmdTurnLeftOnClick(CCObject* pSender);
    
	void fCmdTurnRightOnClick(CCObject* pSender);

	void fAddCollision();

    // implement the "static node()" method manually
    CREATE_FUNC(HelloWorld);

	void fAddMonkey();

	void fSetSizeScreen();

	void fAddTree();

	void fAddBranch();

	void fAddButton();

	void fGameOver();

	void fResetGame();

	virtual bool ccTouchBegan(cocos2d::CCTouch *touch, cocos2d::CCEvent *event);

	virtual void onEnter();

	void fAddScore();

	void fUpdateScore();

	void fRemoveAllChild();

private:
	int mGameOver;
	Monkey * mMonkey;
	CCSize mSizeScreen;
	Branch* mBranch1 , * mBranch2 , *mBranch3;
	CCSprite * tree;
	bool isAddMonkey;

	CCLabelTTF* mlblScore;
	int mScore;
};

#endif // __HELLOWORLD_SCENE_H__
